/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilidades.autocompletar;

import java.util.ArrayList;
import java.util.List;
import utilidades.autocompletar.TextBoxAutoCompletar;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.ComboBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import transervfx.Dato.Entidad.Cliente;
import transervfx.Dato.Entidad.Lugar;
import transervfx.Dato.Entidad.Fisico;


/**
 *
 * @author oscar
 */
public class AutocompletarMain extends Application {
    
    @Override
    public void start(Stage primaryStage) {
       
        ComboBoxAutoCompletar<Fisico> t=new ComboBoxAutoCompletar();
        ObservableList<Fisico> pl=FXCollections.observableArrayList();
        t.prefHeightProperty().set(20);
        
        pl.add(new Fisico("Oscar","Fertonani"));
        pl.add(new Fisico("Rocio","Chavez"));
        pl.add(new Fisico("Rocio","Fertonani"));
        t.setData(pl);
       /* pl.clear();
        pl.add(new Fisico("Oscar2","Fertonani"));
        pl.add(new Fisico("Rocio2","Chavez"));
        pl.add(new Fisico("Rocio2","Fertonani"));
        t.setData(pl);*/
        VBox root = new VBox();
       
        root.getChildren().add(t);
       
        
        Scene scene = new Scene(root, 300, 250);
        
        primaryStage.setTitle("AUTOCOMPLETAR!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    /**
     * The main() method is ignored in correctly deployed JavaFX application.
     * main() serves only as fallback in case the application can not be
     * launched through deployment artifacts, e.g., in IDEs with limited FX
     * support. NetBeans ignores main().
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
}
